package org.example;

public class StringTest {
    public static void main(String[] args) {
        String str1 = "abcd";
        String str2 = "abcd";
        String str3 = new String("abcd");
        String str4 = "ab" + "cd";
        System.out.println(str1 == str2);
        System.out.println(str1 == str3);
        System.out.println(str1 == str4);
        System.out.println("*********");

        String str5 = "ab";
        str5 += "cd";
        System.out.println(str1 == str5);
        str2+= "e";
        System.out.println(str1 == str2);
    }
}
